-
Notifications
You must be signed in to change notification settings - Fork 1k
HAL module only #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HAL module only #750
Conversation
d279280
to
3605bcb
Compare
3605bcb
to
4a1cde7
Compare
Hi, In my testing of this branch, I've been having trouble clearing the following build error:
I've tried enabling UART HAL module in my build_opt.h file:
|
You have to use the definitions I've described in the first post. |
4a1cde7
to
bdc9a97
Compare
Is it ok @geosmall ? |
My test application appears to compile but something seems strange. I have a TIM interrupt in a C file as part of my test project. It compiles fine even with no defines in build_opt.h. It appears to me that both are getting compiled and linked but with no errors. I need to boil it down to a small test application to confirm. I'm not sure I am understanding the default, HAL_NNN_MODULE_ONLY and HAL_NNN_MODULE_ENABLED define behaviors. Could you provide a bit of guidance on how users are supposed to use these options in build_opt.h? |
Sorry @geosmall didn't see you wait for a guidance. |
Define `HAL_UART_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL UART module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Allow HAL I2C module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Allow HAL SPI module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Define `HAL_TIM_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL TIM module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Define `HAL_ADC_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL ADC module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Define `HAL_DAC_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL DAC module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Define `HAL_RTC_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL RTC module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
Define `HAL_RTC_MODULE_ONLY` in `build_opt.h` or `hal_conf_extra.h` allow HAL PWR module usage without any usage by the core. Fixes stm32duino#697 Signed-off-by: Frederic Pillon <[email protected]>
bdc9a97
to
e04569d
Compare
@geosmall |
It appears to be working as intended. I would go ahead and merge. I will continue testing. Thanks! |
This PR allow to enable HAL module only
Defining
HAL_PPP_MODULE_ONLY
inbuild_opt.h
orhal_conf_extra.h
allows HAL peripheral (PPP ) module usage without any usage by the core.Hereafter list of possible definition:
HAL_UART_MODULE_ONLY
HAL_TIM_MODULE_ONLY
HAL_ADC_MODULE_ONLY
HAL_DAC_MODULE_ONLY
HAL_RTC_MODULE_ONLY
HAL_PWR_MODULE_ONLY
I2C and SPI do not required definition as used only thanks built-in library. Do not include
Wire.h
orSPI.h
will allow to use HAL module.Fixes #697
/CC @geosmall